<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
    PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<!-- /fasttmp/mkdist-qt-4.3.5-1211793125/qtopia-core-opensource-src-4.3.5/src/gui/text/qtextobject.cpp -->
<head>
  <title>Qt 4.3: QTextBlockGroup Class Reference</title>
  <link href="classic.css" rel="stylesheet" type="text/css" />
</head>
<body>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td align="left" valign="top" width="32"><a href="http://www.trolltech.com/products/qt"><img src="images/qt-logo.png" align="left" width="32" height="32" border="0" /></a></td>
<td width="1">&nbsp;&nbsp;</td><td class="postheader" valign="center"><a href="index.html"><font color="#004faf">Home</font></a>&nbsp;&middot; <a href="classes.html"><font color="#004faf">All&nbsp;Classes</font></a>&nbsp;&middot; <a href="mainclasses.html"><font color="#004faf">Main&nbsp;Classes</font></a>&nbsp;&middot; <a href="groups.html"><font color="#004faf">Grouped&nbsp;Classes</font></a>&nbsp;&middot; <a href="modules.html"><font color="#004faf">Modules</font></a>&nbsp;&middot; <a href="functions.html"><font color="#004faf">Functions</font></a></td>
<td align="right" valign="top" width="230"><a href="http://www.trolltech.com"><img src="images/trolltech-logo.png" align="right" width="203" height="32" border="0" /></a></td></tr></table><h1 align="center">QTextBlockGroup Class Reference<br /><sup><sup>[<a href="qtgui.html">QtGui</a> module]</sup></sup></h1>
<p>The QTextBlockGroup class provides a container for text blocks within a <a href="qtextdocument.html">QTextDocument</a>. <a href="#details">More...</a></p>
<pre> #include &lt;QTextBlockGroup&gt;</pre><p>Inherits <a href="qtextobject.html">QTextObject</a>.</p>
<p>Inherited by <a href="qtextlist.html">QTextList</a>.</p>
<ul>
<li><a href="qtextblockgroup-members.html">List of all members, including inherited members</a></li>
</ul>
<a name="protected-functions"></a>
<h3>Protected Functions</h3>
<ul>
<li><div class="fn"/><b><a href="qtextblockgroup.html#QTextBlockGroup">QTextBlockGroup</a></b> ( QTextDocument * <i>document</i> )</li>
<li><div class="fn"/><b><a href="qtextblockgroup.html#dtor.QTextBlockGroup">~QTextBlockGroup</a></b> ()</li>
<li><div class="fn"/>virtual void <b><a href="qtextblockgroup.html#blockFormatChanged">blockFormatChanged</a></b> ( const QTextBlock &amp; <i>block</i> )</li>
<li><div class="fn"/>virtual void <b><a href="qtextblockgroup.html#blockInserted">blockInserted</a></b> ( const QTextBlock &amp; <i>block</i> )</li>
<li><div class="fn"/>QList&lt;QTextBlock&gt; <b><a href="qtextblockgroup.html#blockList">blockList</a></b> () const</li>
<li><div class="fn"/>virtual void <b><a href="qtextblockgroup.html#blockRemoved">blockRemoved</a></b> ( const QTextBlock &amp; <i>block</i> )</li>
</ul>
<ul>
<li><div class="fn"/>1 protected function inherited from <a href="qtextobject.html#protected-functions">QTextObject</a></li>
<li><div class="fn"/>7 protected functions inherited from <a href="qobject.html#protected-functions">QObject</a></li>
</ul>
<h3>Additional Inherited Members</h3>
<ul>
<li><div class="fn"/>1 property inherited from <a href="qobject.html#properties">QObject</a></li>
<li><div class="fn"/>4 public functions inherited from <a href="qtextobject.html#public-functions">QTextObject</a></li>
<li><div class="fn"/>29 public functions inherited from <a href="qobject.html#public-functions">QObject</a></li>
<li><div class="fn"/>1 public slot inherited from <a href="qobject.html#public-slots">QObject</a></li>
<li><div class="fn"/>1 signal inherited from <a href="qobject.html#signals">QObject</a></li>
<li><div class="fn"/>5 static public members inherited from <a href="qobject.html#static-public-members">QObject</a></li>
</ul>
<a name="details"></a>
<hr />
<h2>Detailed Description</h2>
<p>The QTextBlockGroup class provides a container for text blocks within a <a href="qtextdocument.html">QTextDocument</a>.</p>
<p>Block groups can be used to organize blocks of text within a document. They maintain an up-to-date list of the text blocks that belong to them, even when text blocks are being edited.</p>
<p>Each group has a parent document which is specified when the group is constructed.</p>
<p>Text blocks can be inserted into a group with <a href="qtextblockgroup.html#blockInserted">blockInserted</a>(), and removed with <a href="qtextblockgroup.html#blockRemoved">blockRemoved</a>(). If a block's format is changed, <a href="qtextblockgroup.html#blockFormatChanged">blockFormatChanged</a>() is called.</p>
<p>The list of blocks in the group is returned by <a href="qtextblockgroup.html#blockList">blockList</a>(). Note that the blocks in the list are not necessarily adjacent elements in the document; for example, the top-level items in a multi-level list will be separated by the items in lower levels of the list.</p>
<p>See also <a href="qtextblock.html">QTextBlock</a> and <a href="qtextdocument.html">QTextDocument</a>.</p>
<hr />
<h2>Member Function Documentation</h2>
<h3 class="fn"><a name="QTextBlockGroup"></a>QTextBlockGroup::QTextBlockGroup ( <a href="qtextdocument.html">QTextDocument</a> * <i>document</i> )&nbsp;&nbsp;<tt> [protected]</tt></h3>
<p>Creates a new new block group for the given <i>document</i>.</p>
<p><b>Warning:</b> This function should only be called from <a href="qtextdocument.html#createObject">QTextDocument::createObject</a>().</p>
<h3 class="fn"><a name="dtor.QTextBlockGroup"></a>QTextBlockGroup::~QTextBlockGroup ()&nbsp;&nbsp;<tt> [protected]</tt></h3>
<p>Destroys this block group; the blocks are not deleted, they simply don't belong to this block anymore.</p>
<h3 class="fn"><a name="blockFormatChanged"></a>void QTextBlockGroup::blockFormatChanged ( const <a href="qtextblock.html">QTextBlock</a> &amp; <i>block</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
<p>This function is called whenever the specified <i>block</i> of text is changed. The text block is a member of this group.</p>
<p>The base class implementation does nothing.</p>
<h3 class="fn"><a name="blockInserted"></a>void QTextBlockGroup::blockInserted ( const <a href="qtextblock.html">QTextBlock</a> &amp; <i>block</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
<p>Appends the given <i>block</i> to the end of the group.</p>
<p><b>Warning:</b> If you reimplement this function you must call the base class implementation.</p>
<h3 class="fn"><a name="blockList"></a><a href="qlist.html">QList</a>&lt;<a href="qtextblock.html">QTextBlock</a>&gt; QTextBlockGroup::blockList () const&nbsp;&nbsp;<tt> [protected]</tt></h3>
<p>Returns a (possibly empty) list of all the blocks that are part of the block group.</p>
<h3 class="fn"><a name="blockRemoved"></a>void QTextBlockGroup::blockRemoved ( const <a href="qtextblock.html">QTextBlock</a> &amp; <i>block</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
<p>Removes the given <i>block</i> from the group; the block itself is not deleted, it simply isn't a member of this group anymore.</p>
<p /><address><hr /><div align="center">
<table width="100%" cellspacing="0" border="0"><tr class="address">
<td width="30%">Copyright &copy; 2008 <a href="trolltech.html">Trolltech</a></td>
<td width="40%" align="center"><a href="trademarks.html">Trademarks</a></td>
<td width="30%" align="right"><div align="right">Qt 4.3.5</div></td>
</tr></table></div></address></body>
</html>
